package com.example.dameng.controller;

import com.example.dameng.entity.FileDto;
import com.example.dameng.entity.User;
import com.example.dameng.mapper.DemoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/demo")
public class DemoController {

    @Resource
    private DemoMapper demoMapper;

    @GetMapping("/selectAll")
    public List<User> selectAll() {
        List<User> demos = demoMapper.selectAll();
        return demos;
    }

}
